Changed from Promise to scala future and fixed issues with code.

Changed from Promise to scala future and fixed issues with code.