style changes and minor fixes