refactored codebase to make folder structure cleaner