Added some JS improvements for file box handling