Issue 16

I've merged with the BC dev branch and all other outstanding pull requests, so hopefully there won't be any conflicts this time.