changed modifier order
refactored to named static inner class
added sonar exclusions