Added filter.js and modified controller to support filter messages and added a filter error controller function