Removed some unnecessary signals (thanks Victor!) and updated testbenches accordingly.
Also tested to see if fsm would behave correctly for a z input of -1 / 2 (half would be replaced, the other half would not)