Initial stab at cleaning up code and produce decent python installation setup.