Additions to processInput().

Some additions to the processIntput() function.