Get rid of unnecessary(sp?) for loops, this should be more efficient now.