Code cleaning part 1