Complete code cleanup