Refactors namespace structure