Some more unit tests and variable changes