Adding extra functions and unit tests.