Edited some functions to generate transparent PNG