Refactor library structure
__init__.py
Make API consistent
Make the CLI use the new API.