Updated code to only generate statements.