Remove old files
Make lib/main a factory function
Fix typo in namespace
Make sure the order of the deps and the requires array are in sync.
Fix all other tests with some new API changes