Change architecture to be modular and use configurable backends