better math, fixes touchhandling and angle functions

Change-Id: I9bc6f653bda00069d3db3cc272473f173980e5e0
Tabs -> spaces
Quick settings on pie

Also basic methods to swap panels