namespace cleanup +  bug fix