Some basic changes - including fleshing out makefile
working nextCommand function
Changed nextCommand function to be easier to use.