Moving constructor logic to method