Component factory: style, comments; remove unused code