Added plot.close() statements to save memory images when using as imported classes with many plots