Style, cleanup, and change the build to produce a library.