Unrefactored args parsing logic