Change order of main loop
Add TODOs to code
Better input handling