Factory pattern done.