Changed classes names, added fragments, added communication between
mainactivity and loggingactivity