tidied up frontend