Some speed optimizations, then() now doesn't return a Function