cleaned up promise definition; made thenable a class
removed unneeded type param