Code refactoring (async/await)