Converted SetVariable and If to use serialized property