Cleaned up inputs, new output, wrote in commented code for checking for duplicate entries