scala models compiling correctly