Cleanup of commented-out and deprecated code