Updated parser to account for non standard inputs.