Some async typescript stuff (promises, storage etc.)