Add useful functions to objects