Rearranged everything to compensate for new global structure :-)