Added basic Model class and Cube factory function

There seems to be a weird segfault that happens every now and then;
i'm not sure why it happens.