Improved main activity