parseMedia and parseMediaPaths

- Cleaned out some looping code
- Added a new function parseMediaPaths to parse individual media
objects and build an array with paths to individual media objects.