Renames further 'end date' references
Removes superfluous locals
Renames permitted param