Added better basic token processing to user input loop