finalized Makefile and stage2.sh, the script to run everything.
more fixes to the printing function; could use refactoring, but is correct.