Adding cleanup code to remove namespace

Collapsed commits for cleanup code