Added class for identifying which unit has which picture at general
context. 

Done some changes of variable types.