corrected js errors and enhanced UI