Added promises module; revised persistence module to return promises.