Brought in functions from Westbrook analysis.