Remove scoped_ptrs (Windows part still needs to be done)