Cleaned up file.c and file.h
First pass over thread.c and thread.h
All code has been cleaned up