Added some useful functions.

These are some functions that i use all the time, would be nice if it could be added.