Refactor (foundry-entry): Update javascript and some markup

Corrects bugs from an earlier refactoring merge.