Updated args parsing logic