WIP: tests + fixes + love

You may want to credit the original author, too