Fixed problem with equals of promises
Niftier error msg
Better promise function