Dead code remmoval & warnings fixes.