Code cleanup from unnecessary if statements, adds "use strict" + variable reference enhancements.

I made some enhancements to code when I implemented this on my presentation. Check, if you want to include them to master.