Fixes to typed promise
Rework of service layer using promises