Cast fix. Debug info about density.

This actually works properly now. Getting close to a releasable
test plugin.
gitignore.