Improved the speed of filtering and pulse expanding by using DoT.js

Though it still isn't as fast as I'd like it to be.