improve run.py
improve spawn_threads params handling
some comments
add test template and improve readme