change web disatcher from if-else to disatcher table
tidy up and remove THREAD_JOIN