Refactored main app code to use Async/look cleaner