cleanup helpers and events
cleanup query