Refactoring, Documentation, Unit Tests

Have done some method refactoring
Added new unit tests and reorganized the existing once
Added documentation to the classes, methods and fields