Clean up code and change to PyDev conventions.
Expect more rampant package renaming, as I'm not quite happy with the current names.