Add OS Check, started code cleanup