Changed about everything you can imagine. Changed the folder structure, removed the controller code from the view and put it into the controller so that the view is very clean and only presents html, nothing more. Added some statics so that we do not need to change variables in more than one place. Should maybe change some more of those.
Removed some more unused code. Should start working on the session theft prevention, but that is something difficult to achieve