Made processing script slightly more efficient.