Remove dead code and add better message