WIP breaking up into smaller modules and testing