Cleanup if conditions for klass appending