Tidied up, improved output