Start working on Coq implementation
Refactor