REFACTOR - Refactored the parser class and pulled out the element parsing functionality into a new class.