Refactoring to make the file simpler; no need to over-complicate with async methods if this project is for local purposes only.