fixed csv/text newline problem
cleaned up inferno main so there is less redundant code