Moved a bunch of functions into static classes. Renamed 'app' stuff to 'application'. Better plugin activation. Session now a plugin. Lots of improvements, with more to come.