Remove test code, status bar type works too
Reduce layout calculation logic
Move class methods to be closer together