Change inner classes to static inner classes where possible