Some style improvements (thanks to -Weffc++)