major code restructuring