Refactory component factory to make use of latest convention.