filtering JS, metadata and styles refactoring