Collection of useful Mathematica functions