Made some speed improvements.