Modified to compile in the linux environment.