More clean up

Cleaned up the JWT code more to be easier to read and more tidy.