Ensure cursor moves diagonally into corners correctly, minor semantical changes