made the console output a tad friendlier. added unset and exit statements where necessary.