Structural aspects of the magnetic and melting transitions in bilayer molecular oxygen on graphite