Simplify some code, change it from soft to weak references, and create some additional options for sweeping