First commit on khalil
Merged with libai (hopefully)
minor change comments