fixed formatting issues and code style.