Major refactor to return defaults in closure

Also removed the initial listener from the JS, we will put this only
into the pages that require it.