Refactor adding, modifying queue records; fix main page.