Fixed IO issuses (old files now get deleted and rewritten) and introduced multithreading
Added stuff