Implemented Builder Pattern. Added some tests. Performed some refactoring.