Tidied up Main again