Updated the dandelion functions for added security