added OS detection functions
added section to cleanup OS decection outpout