Implemented imageusage and globalusage, per issue #83