Separated UI JS into a separate file.