Changed interface to class; added multithreading; seperate run file