Simplify SIM arg parsing, remove duplicate while loop

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>