made MainActivity easier to read by fixing style errors and warnings