Refactored backend management code into ./src/agl/backend.c.