Major speed improvements. Still pretty slow though. :(