Refactor: Move methods to inner class.