Moved some code to Models.