added strict mode and some other changes