Fixed some warnings and deprecations

Not sure what to do about the dead_code warning for ValueToken,
should that be used?