Improved ddr a little bit, and added a utility function for namespaced elements.