Remove oldmost of old inputstream code, condense try/catch blocks