Remove dead code, and cleanup formatting more