Removing duplication using strategy to build different component types.