Rename namespaces. Add simple loop test. Fix small errors.