Major fixes, some rewrites and .... we've got a working version!