a few correction, missing modules, None default values
add the code to remove extra space
remove extra spaces