Some bug fixes and display improvements