Revised ui.R and server.R.