Delete dead code
Correct compile errors