Collection of utility functions for SML