Fix some layout and JS issues