Reverted some previous optimizations

In the first version we should keep it easy and safe, later we can work
on those optimizaitons. Keep renderFilter method private for now.