Keep one line nested classes at the top, move multi-line nested classes to own file.
Merge pull request #278 from equivalent/inner_classes

deffinition of small inner classes should be at the bottom of class