Renamed function back to 'editPart' and also renamed conflicting variable to 'editedPart'