Switch to use promises where possible

Can't remember why this was here, wish I could.