Fixes to JS to make it scale down to screens properly.