Remove unneeded methods and clean-up code.

backport this commit from master because this fixes https://bugzilla.redhat.com/show_bug.cgi?id=1070453 for 6.2.x