Tiny JS fix
Rearrange some details of the item-specific indexing and add a test
Stub out some tests we need to write for the portal views