add cursor shape changing
constrain select box to image area

and some cleanups