some cleanings in code