Consolidated tests into separated files and fixed token check