Split up functionality into logical packages for better testing