Finished filtering and some fixes