Added TreeCOMSolver and refactored serialization code