Updated makefile and some minor tweaks