restructure project to allow easier testing