Fix bug#1
Added a lot of commented code used to debug bug#1
Cleaned a little the code

Signed-off-by: seal20 <agostini.sylvain@kurofune.shimoda.tsukuba.ac.jp>