Changed serialize_cover to use stringstream
Added termination conditions for complement computation