Revamp Promises and error handling