Replace magic numbers in trimmedExtent with variables..