Bug fixing on Mean State

I think its done...