Constructor optimization & factory test fix