Pull latest dev changes into bootstrap3

Here are some recent changes to dev, that should be merged across into the bootstrap3 branch. We'll want to make sure there's nothing here that breaks in b3 (but I don't think there will be, or if there is, it'll be a few minor view tweaks; there's no serious front-end work on dev at present).
A small amount of b3-ification will probably be required here.