Add layout cache service and remove unused namespaces