working bubble filter and removal, fixed some bugs