Markusian trees forests recognition

Here are some suggested changes to handle corner cases, and update docs.