Proposing refactoring

Proposing some small refactoring by wrapping all files with closure.