add missing features, fix bugs, change namespacing scheme