Tidied up a bit. Still not working though!