6e8749b27f
Also, lots of little cleanups: formatting, adding return statements and return values where they were missing, fix spelling mistakes, add newlines to separate command blocks, remove trailing whitespace.