Add remove tests

also better error message in fsm.js