Full rewrite (0.9)