Separate implementation of functions in Miscellaneous.h