refactoring to determine output format from output file extension
removing unused function
moving default values into clj