locals variables, image handling, finish upgrade