made a number of style tweaks and performance improvements