Replaced static factory method with constructor