Refactored model to be object-oriented.

Hi Co,
Sorry for the delay. Take a look at the OO version. Lemme know if you'd rather I change some things.

Best,
V.