Refactoring of moveTo functionality to allow changing position from client code