Cleanup structure of the project and add more unit-testing