beef: Make a bunch of style/standards changes.

This is mostly a style commit. This also adds a `pkgver` function.