Move filter html code to general file
Fix broken code