Kohana 3.3 support, refactoring, cleanup