cleaned up Makefile
added return value to main for terminals