Added some doc and some contracts