Made slightly more efficient.