Some style improvements.

* Change some names from camelCase to lisp-case.
* Make some DEFVARs into DEFCONSTANTs
* Simplify some functions
* Use special purpose loop forms instead of LOOP, like DOLIST and DOTIMES