Began the guts of the code.