Make the javascript codes more simple.
Fix the problem about caches leading to wrong appearance of pictures.