Initial commit of GRAIL code