First working draft. Still much to be done. Auth is next