Comitting Ernesto CASL patch 5

Addresses part of #70.  #147 must be merged before this.