cs fixes
fix js tree on non form pages
move custom behavior to global template as option