Initial commit using classes

It's broken since python classes don't inherit parent classes. Need to
switch to functions