Added sort view model building functionality.