Reduced scope from $(document) to _pe.main