Add test suite for jsonwebtoken package
Improve functions definitions