Make layout changes to javascript