Linux fixes, started working on Windows support