Some fixes for files and threads, added 2 modules