Fix all errors. Build but not tested.