Check that input shapefile type is polygon
Refined comments and error messages
Apply translation after unioning everything
Skip features with null attribute values
fix doh typo; forgot parentheses
consistentified parts/paths terminology