Split logic over multiple files for clarity and readability