tidied comments and console output