Add test script for standalone testing.
Bugfixes for DBS3 based on standalone testing.