Added .promise() and function names for inspection
Added tests for .promise()