Added detail namespace.  Removed some unused functions.