debug cleanup
maths cleanup
more maths cleanup