Clean Up <export> Tag

Fixes #35. Also changes basestring to str for Python3 compatibility.