Removed most of Wrong number of args warnings
Reordered defs to remove undeclared Var warning