Fixes to CS351/HW3

Will be rebased