code cleanup, filters fixes, calendar and event templates