remove unused templates dir
fix self and this error in filter