Tidy up the codes to include inheritance of common features for reusability. Also added options to change opacity, scale factor, color mode and contour values.