I think that's my next project! Its working for now and as such I'm happy with it

Oh and the x/y limits were just badly named, found them eventually.