Style improvements and minor fixes