Ensure all necessary files are explicitly required where needed; minor refactoring