Implemented flame effect, fixed memory leak issue