Added a number of unit tests, renamed some classes and properties