Modified the assembly to include auxiliary components that are needed for the optimizer to work with boundary variables. Still a work in progress as the optimization still does not work.