Masonry – Can’t Find Variable imagesLoaded

I discovered that by removing the footer.php file, I was removing a link to the function wp_footer(); which essentially does this:

function wp_footer() {
    /**
     * Print scripts or data before the closing body tag on the front end.
     *
     * @since 1.5.1
     */
    do_action( 'wp_footer' );
}