Restructured some classes to make the API more usable with custom servlets and non-boot environments