Refactored code to make PromiseFactory stateless / pass decorators via argument