Addressed r7 comments, fixed bug in results loop