Mattphotonman rebased

Rebased version of https://github.com/swcarpentry/bc/pull/88

Ready for review.