Updated common function, and recreation of png