more fixes and enhancements

Added input/output filename selection
formatting changes
removed useless 2 lines