style fixes, and fixed a few reference errors