geometry/offset handling
simplify mouse code