Modified the contructor to include unrestricted variables when solving.