Better platform detection; start of running as a service