Add Multi Backend support

This is based on previous work by Sascha and with help from
Balazs and Thomas.
I think these changes are not related to multi backend, right?