Fixed compile errors .... mostly.