Added all of the finalized code