Changed some things to compile under linux.