Update
Some refactoring to disentangle rendering from user input
Refactoring