Added unit factory test, also updated Makefiles for greater efficency / clarity