Minor changes to code to clean it up a bit.