reorder classes and top level methods