Fix cli param parse order

both of these commits break what I was trying to acheive, but leave some code for it there. I'm combining #240 and #241 in this PR and then will add a third to clean up