Rewrite input handling
Multiple update phases