Autotests. Bug fixes.