[Olena-patches] milena r1226: Add tests and clean gray values