Fix compiler warnings
Remove dead code
Format
what