Added some library functions.