Improve Switch serialization #70