Reorganised for npm friendliness.