fixes to options structure being passed to means, some python 2.6 fixes too