Change all '=' to '<-', fix regressions with tryCatch(), make output data frame functional