Rewrote makefile to be more cleaner and generic.