rewriting beacon to be a little cleaner, and changing the storage over to promises,