some proof of concept code and minor bug fixes in Lisp code