Proper minification

#18 PR included to fix DI for minification