Remove global leak, closes #22