Code Style formatting and some minor fixes