majot project restructuring and code refactoring