Fix check for incorrect number of export arguments
Fix some errors and warnings from pylint