Reference count fixes
Added process object deletion