coding styles and minor changes