Moves code out into relevant inc/ files