fixed HTML validation errors
various C enhancements