trailing semicolons are optional
improved insertion of semicolons
added option to use STDIN and STDOUT instead of files
semicolons aren't added before some keywords