Rewrote autotest in coffeescript, fixed the result bug