Add word wrap to console output and fix scrolling in console

Change-Id: I6684e4be6754a3c2abe70da76062a02aef0c5ef6