Tested sufficiently. Moved conversion to the model