Filtering and other minor fixes