handleArgs function

Internal: Handle arguments