Auto code compiles better

still a couple warnings
Trying to fix more compile erors

Seems to work better, still messed up