Remove self-dependencies from output

Closes #41.