First version of the code + a test demo file