JS fixes, facelift and enhancements

Fixed some JavaScript issues to make it work on Firefox and did a minor
facelift of the app with some UX tweaks.