Misc. changes to clean up code.