Removed the old style of if endif; and replaced with brackets.