First revision including gutting of original code