Corrected some lines. Use of Burngine Functions