moved some functionality into stream2string()
pulled functionality into getPointer()
added several code comments