More conformance with Google C++ style guild - numerous minor changes

Don't prefix with namespace when already inside it
Put braces on same line in all cases
public entities appear before private entities
Reduce whitespaces added by namespaces
Indent with two spaces
Return types on same line as the function name
Wrap implementation code in namespace, instead of a namespace prefix