Bibliography refactor

Pull request mostly for the purposes of keeping updated with my own work on #92.

I will be continuing to push items to this, so it would probably be best if this wasn't entirely closed (not sure if that's possible in the github interface?)