Refactored javascript to remove ChildItemsView