Split out functionality to different files.