Fixed the `focusOn` function and factorized `move` and `moveTo`