Fixed delegation of events when reflowing content.
Refactored rendering.
Added config button.