Allow for transparent background
some cleanup and testing for transparent background