More refactoring and modified directory structure