Starting to add some unit tests

Also adding a UUID function useful for internal file naming.