some cleaning in code