Fixes to scripts, prevent errors on pages without search or sticky elements
Adds 404 page