Added simple test script and fixed small bug.