Some functions for creating scatter density plots as well as some various fixes.