significant restructuring, basic creating and updating now working properly