made PromiseKit a non optional dependency and moved promises code into main class