implement WHERE filter, improve layout
clean up database object