Refactoring of Tabris internals.