Fixed stuff, tested.

Fixed a few mistakes, tested with 2 inputs in a test case case, took in
the values correctly!