Remove some useless functions and comment a little bit the code