added pragma marks, dry-ed up the code, removed the predict button