Updated packaging.

The package definition has been improved and now the main module file exports everything, and you can require the npm module directly (it will use the main module file).