Adds most of the general structure