Finished Fst implementation (untested)