namespace move and slight refactor