Fixed issues with model, tests now running correctly