changed a few variable scopes, moved onItemClick, log clicks in Main