Refactored inner classes to their own files