added unit tests and did a folder restructuring