replace internals.R with dummy.R
refactor kmatch by pulling out the portion that calculates A and b for the constraint equation.