added missing include directives and namespace qualifiers.