Made checks better and added more es5 patches