Initial commit of Promise/A+ compliant rewrite.