changed layout + code cleanup in main activity +  begin distance calculations