Move from *.rc to *.rs, update builds.

Also fixed tests for fsm.