Cleanup unused code
Cleaner promise code