Fixed auto Compiling

I fixed the auto code so that it complied, but still having problems
compiling because of errors in defining variables, not sure how to fix
the error in defining.