Buildsys improvements

Fixes #75.
Fixes #76.