Add word wrap to console output and fix scrolling in console

Change-Id: Ibcf89952ee1391350c715f1ec82cf0cdb9b0ca7d