Changed the OS detection to be more efficient