Add Factory method and free input support