New: refactoring
New: namespaced core modules, and added context manager support