Import code from lmbtest.wikia.com