Promise wrapper and utility library