Refactoring: extracted private methods for each section of parsing for 
clarity.