Most simple compile errors fixed - a few more difficult ones to process.