Resimplified OS handling
Remove file handling, to be implemented differently
Add option of running in debug mode