Committing Ernesto CASL patch 9

Addresses part of #70.  #151 should be merged before this.