Many changes + code cleaning