Move require to the footer to ensure DOMContentLoaded