Refactors reason phrase parsing

This is easier to understand and performs better too!