Code review 2 and general style improvements.