Better lua error reporting, finalize change to new spells format
Refactor so that lua namespaces start with capitals