removed some unused code
added missing end of namespace