Support multiple backends and add alloc backend

Right. Forgot that it exists.