SparsePtr: Fixed some operators not being const
Improved code
Improved MemoryManager handling of failed allocation

Now throwing a std::bad_alloc