Moved more functions from main to render. Added function: change the View (F5).