Update JS UI to display only one of code/output at once