initial rev. Still uncertain about what should got into the repo. Will cleanup later.