Pruning extra code and cleaning up functional code