Moved nested classes into their own files