Rearranging python/ structure
Ensuring python 3 compatibility.