more work on views and javascript