Reformatted code according to google-cpp style guidelines.