Refactoring
Improved platform detection