Fix incorrect selection reset.
Tweak BreakTest.
Tweak log rectangle.
Tweak cursor position.
Fix conventions.
Cleanup code.