A bunch of usefull functions