Refactored for better separation of concerns. InputHandler no longer handles parsing functionality. Abstract class Parser added to handle all parsing.