changed main to accept file paths,
removed commented and unused code