Fixed issues in model, test is still not working