Added some handy functions.