compile support for linux and small cleanups