Add run_tests.sh. Fix self._settings bug