fixed minor issues with engines
added a QuickCheck test file to test engine correctness