Changed end to end if for procedure. Others update.