Made major changes. Should process faster with less errors. Errors are now logged to an error.log file.