tidy makefile and fix parsing bug
tidy up file opening bug and back button