Lots of style consistency changes and documentation