Add utility functions.
Add a test script to run unit tests.