Add slight refactoring to marker movement funcions