Refactor to provide component object