Begin Assembling Functions

The foundational code for the main functions was adapted.