Fix compilation

Missing headers
Warning fix

Comma at end of enumerator list