a couple more unit tests, bugfix, support for empty code.