Updated the FSA and WOR implementation.
Fixed WOR and FSA implementation.