Tidied up variables a bit