Refactored namespaces of foundation library