tidied some stuff up