Tidied up controller