Add promises to reduce code clutter (fix #6)
Merge pull request #16 from tofumatt/promises

Add promises