Tidied some code.