Minor performance and style improvements.