a lot of refactoring of the lower-level handlers, mostly to make the library more maintainable. This will help to introduce more of the events API.
fixed a bad calculation with right-side back panes when opened with a button