Refactoring
Perfomance
Add class Environment, detect unix systems
Remove Threading, move detect function to Environment