Fix for clang 3.1
Minor changes and code beautification.