Finished data loop

Data loop now prints address followed by DATA. Also condensed the code so that the data loop is it's own function.