Upgraded all dependencies and simplified the code