Seperating controller and view