Update from package-template

This includes all the latest changes based on the updates in the package template, and replaces #22. If Travis passes, this can be merged and #22 closed.