Refactor metadata parsing routines into separate functions.