Change to match the reference syntax, and take better to handling namespaces.