Start of OO

OO code introduced and rewritten, currently working with a few minor
bugs