improved stdout and var names

prefs now strips whitespace
added close() to reqsock on master query