Continued work on filters and changed some other database stuff