fixed indentations, code style, and messages