huge refactoring and assets minification issue