Copied code kind of works. Time to fix it.