Did a hacky minification implementation in Javascript. Need to make a better solution