Tweaks to make this work nicely as a real python package