Code cleaning / Events Fix