Refactored: simplified code in frontend.js by leaving pipelining to the framework - filter.js