Moved some checks to the model