Clean up
Handle input and cursor direction