changed admin UI and refactor JS