Added wait mechanism which shows spinner during promise operations