refacter directory and namespace