Modified the JS so text is cropped to a better format