fixing compile errors

also fixing some c# convention stuff