Micro optimizations

I've made some changes such as using `[]` over `new Array` as it's quicker to execute. Also using explicit equality over `==`.