Remove some unnecessary fields from Ptr
Use dynamic_cast to get the LiveCellRef
Small header cleanup
Throw an exception when trying to get an empty Ptr's type