Remove strtol use in favor of bit shifting.

Use bitshifting rather than string handling to parse data, as it is cleaner.