Removed reliance on Zend Framework; Updated most calls to deprecated functions; Small bugfixes; Formatting.