Enabled strict mode.

* Enabled strict mode.
* Fixed errors in strict mode.
Some minor fixes.