Initial Parser Code/Some Refactoring

@prototype-v4