Small performance improvements in layout of main activity