First cut of the complete implementation

Almost everything implemented in gory detail
Validation begins