Adding clean up old stuff logic to qekb