Moves code into domain-specific folders for better modularity. Updates imports to reflect the new directory structure.