refactors javascript views to eliminate zombie views