Code refactored into multiple files