Reduced lines of code by iterating through an array for some parts.
Created by: nobubby
A couple points in this file was a series of the same if-then over and over and over, with no reasonable gain in maintainability. We ought to be able to initialize the parser with some kind of array like I have in the beginning, so that there aren't two data structures being made with the same data, but this is alright for now. Also removed a glorified goto statement.