Version 3 started

A complete rewrite for version 3