Removed obsolete and redundant code.