remove superfluous variables
consequently update lineno although it's not really used
simplify options parsing