First attempt at working model; now actually compiles