added makefiles, as well as fixed some bugs. TODO: continue fixing the wrong addressing