minor changes to clean up code