Add word wrap to console output and fix scrolling