Fixed some bugs. Fixes #38 by pulling in the new engine.