cleanup and add linux support