Separated model from view and added limiting