Fixed bugs, added more tests
Fixed bugs, added more tests

mikarubi/thunder,broxtronix/thunder,pearsonlab/thunder,j-friedrich/thunder,jwittenbach/thunder,oliverhuangchao/thunder,kunallillaney/thunder,mikarubi/thunder,j-friedrich/thunder,kcompher/thunder,kcompher/thunder,pearsonlab/thunder,oliverhuangchao/thunder,zhwa/thunder,kunallillaney/thunder,thunder-project/thunder,zhwa/thunder,broxtronix/thunder,poolio/thunder,poolio/thunder