Simplify SIM arg parsing, merging duplicate code

Signed-off-by: bergerkiller <bergerkiller@gmail.com>