Minor cleanup and improve handling of expressions in add field method