Initial code coming from cristal-web at cristal repository