Added more logic - including view counts!