fixed various CS and documentation issues