Tidied code a bit.