added support for additional namespaced elements

cleanup

made tests PHP5.3 compat