Implements managers and refactor namespaces.

Make the API way  more pythonic and homogeneous.