rearrange config file
fix line read-ins for stdin
remove unused functions