Updates for linux

Updates to make it work with linux and a few other updates