Working and somewhat tidied