Remove now-unused PromiseState definition
Document everything, make code style consistent