Structuring code, adding global image repository