some cleanups of condition.cpp