Remove functions

*added query-based remove functions foar database