some cleanings documentation and other little enhacement in the code