Switch to use promises where possible

Nice clean up.