refactoring overlay factory to load overlays dynamically