Clean up according to pitrou comments
More cleanup