Added first unit test. Minor script updates.