Made some common functions, made threads be daemons, some smaller other
fixes (mostly wording in user messages).