Recombined run/build commands into shared functionality. Significant reduction in redundant code. Fixes #25.