added template manager, updated metrics, better filtering