Massive tidyup - thanks eclipse formatter and lots of search replace