Removed unnecessary promise code