Show Manager improvements for functions removal.

Tracks removal is still not OK though
Added Doc::functionsByType which simplifies code when looking for functions