Finish implementing backend.c