Need to write some tests for this...
Minor code style changes
Get ready for 3.1.2 release