minor changes and reindents to 2 spaces