Cleaned up stuff, made faster.