Eliminate nested classes