Change display: none to hide() and other small tweaks