Re added sweeping due to sql connections not terminating
Revert non memory-manager files to master