Move the bulk of the functionality out of Kiln::Core