Added promises to the core, and documented everything