Refactor to use cmdargs to support easier multiple arguments