added strict mode and fixed some errors of style of code