Allow backend selection using the Makefile

Cleaned it up a bit wherever reasonable to accomodate for the changes