im_msb() -> class

and some cleanups

add a --band option