Use promises consistently for async calls (resolves #9)