First implementation of models written as classes