Moved model.process functions up one level

This makes the main functions more visible and easier to navigate.