Re-wrote documentation for the current two functions, adapted from a tool written for a friend (all the best, Ewa!)