fixed PMD violations, GravityTest, KeyTest and LevelTest