Changed to use Scoped/Shared pointer instead of raw pointers.
Implemented toggle tool buttons