Minor code and style changes