Close to having this working.