Finished backwards substitution and unit tests for it