Added use strict and min safe pattern

Added use strict statement to all closures.
Added min safe pattern for dependency injection.