Basic variable elimination algorithm implemented and appears correct.