Added support for switch case serialization.
Removed unused classes.