Refactors

All hail to glorious sonar