Fixed indentation, extracted factory method