Add some option mechanics
correct grid malloc to calloc
Correct last commit