Refactured the tests and package structure.