Improved code style and documentation.

I took the time and removed some unimportant generics and added some documentation to the new classes.