Threading and multifile system added