Changed gun system to use boost::optional instead of shared_ptr.