Remove dead code and initialize class members.