Fix global variable
Split tests into multiple files