First working draft.

Comments to come.