Module support and package.json
Use class factory instead of new