Fix test script.
Remove unused inactive state.
Add lua script loading test.
Make some more classes public (needed for the tests).