Refactored ui.js, removed code related to drag and drop.