Bobtfish refactor for multiple backend support

A cleaned-up version of #41 with some nitpick fixes from me.
Closes #41