Major restructure to accommodate testing