move nested classes to own file