Complete code restructure
Complete code restructuring