Added some tests for functions.