started refactor for 2nd-gen cam; add simulation mode, cli mode