Refactor into folders. Break out inner classes