Moving duplicate logic to base view controller