tidied some code elements