Fixes layout issues and adds close button to live code view