Perfomed small tidy up of the code to eliminate dead code

Dead code and comments removed.