make State::mode and State::quit fields private
rename State::set_quit() to State::try_quit()

- also added State::get_quit()
rename function argument

- calling it 'function' is just weird
rename Move command to MoveCursor
clean up imports and fix tests
fix up public exports