refactor and cleanup, add cursor change on some events
more cursor change
refactor and cleanup onmap