Remove dead code from main file