Bobcat rewrite written in Haskell with additional features