Initial commit of functional chtofrscan

the can really works now, with some tests