Implemented @kennethlynne's suggestions.