Starting complete rewrite for v5.0