Removed unnecessary public modifier and made inner class final