Parallel build bugs

This fixes several makefile issues around parallel builds as well as some general cleanup.