Add test_thread_index.c
Prettify Makefile