Various fixes and line number rendering improvements.