Fixed unit automapping for some image functions
Removed debug features for unit checking