Just some code about threads mostly