Still work in progress, version with some UI to review.