Updated promise class to fulfill Promise/A+ standard.
Added a bit of documentation for Promises.