Add reference counting, and clean up code a bit.
Add reference counting, and clean up code a bit.


This used to be revision r2781.

TehSAUCE/imagej,TehSAUCE/imagej,biovoxxel/imagej,TehSAUCE/imagej,biovoxxel/imagej,biovoxxel/imagej