Moved model construction to binding function.