Break down logic for displaying articles into smaller functions, update error messages