More separation of logic from HTML

- Units now get downloaded immediately when exported and file deleted (maybe a good idea to keep these to check what users exported)
- some major re-factoring (requires thorough testing :/)
- Introduced the use of controllers to try to reduce the amount of logic mixed with html. So as a consequence cleaned up a lot from 'webroot' into 'View'