Applied IIFE design pattern and $injection for minification