Updated API controller and Peep model with refactored code after one-to-one meeting to review code