Some performance improvements

Still need more speed improvements before I can move on to connecting
words, etc.