Migrate directory structure to npm module.