Switching to Promise. Closes #49