Begin of classed rewrite, tests!