Externalized and removed the entry selector Javascript from the global scope