Made the garbagecollector in context a shared_ptr and added interface for that. Marked a function as deprecated.