Restructured the code to be contained in a single package