Bugfixes, extend engine looks good now, but still need more tests