cleaned the code some.  still a work in progress